using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Rectangle
    {
        private int _Length;
        private int _Width;

        public int Width {
            get { return _Width; }
            set {
                if (value < 0) _Width = 0;
                else _Width = value;
            }
        }
        public int Length {
            get { return _Length; }
            set {
                if (value < 0) _Length = 0;
                else _Length = value;
            }
        }
        public Rectangle()
        {

        }
        public Rectangle(int length, int width) {
            _Length = length;
            _Width = width;
        }
        public int Area() {
            return _Length * _Width;
        }
        public int Perimeter() {
            return 2 * (_Length + _Width);
        }

    }
}
